package com.jk.wh.dao;

import com.jk.CarouselBean;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CarouselDao {
    @Select("select * from t_carousel")
    List<CarouselBean> queryCarousel();

    @Insert("insert into t_carousel (url) values (#{url})")
    void addCarousel(CarouselBean carousel);

    @Update("update t_carousel set url = #{url} where id = #{id}")
    void updateCarousel(CarouselBean carousel);

    @Delete("delete from t_carousel where id = #{id}")
    void del(int id);

    @Select("select * from t_carousel where id = #{id}")
    CarouselBean upById(int id);
}
